package com.ouc.entity;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Name: ShapeType
 * @Description: 形状类型
 * @Author: Mr.Tong
 */
@Data
@Configuration
@PropertySource(value = "classpath:shapetypeconfig.properties", encoding = "utf-8")
@ConfigurationProperties(prefix = "shapetype")
public class ShapeType implements InitializingBean {
    private Map<Integer, String> type = new HashMap<>();
    private Map<Integer, String> code = new HashMap<>();
    private Map<Integer, Integer> unitAreaPrice = new HashMap<>();

    public static Map<Integer, String> TYPE = new HashMap<>();
    public static Map<Integer, String> CODE = new HashMap<>();
    public static Map<Integer, Integer> UNITAREAPRICE = new HashMap<>();

    @Override
    public void afterPropertiesSet() throws Exception {
        TYPE = type;
        CODE = code;
        UNITAREAPRICE = unitAreaPrice;
    }
}





